data segment
    y db 2,-4,-5,3,6,6,-8
    n equ $ -y
    z1 db n dup(?)
    z2 db n dup(?)
data ends
code segment
assume cs:code,ds:data
start: 
    mov ax,data
    mov ds,ax
    mov cx,n 
    mov bx,0
    mov si,0
    mov di,0
rept1:
    mov al,y[bx]
    cmp al,0
    jle let1
    mov z1[si],al
    inc si
    jmp let2
let1:
    mov z2[di],al
    inc di
let2:
    inc bx
    loop rept1
    mov ah,4ch
    int 21h
code ends
     end start
